package com.example.shixun.controller;

import com.example.shixun.pojo.CourseLessonNote;
import com.example.shixun.pojo.Result;
import com.example.shixun.service.CoureseLessonNoteService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/courseLessonNote")
public class CourseLessonNoteController {
    @Resource
    CoureseLessonNoteService coureseLessonNoteService;

    @PostMapping("/save")
    public Result saveCoureseLessonNote(@RequestBody CourseLessonNote courseLessonNote){
        Integer n=coureseLessonNoteService.saveCourseLessonNote(courseLessonNote);
        if(n!=0){
            return Result.success(n);
        }else{
            return Result.fail("添加失败");
        }
    }
}
